package com.itheima.health.dao;

import com.itheima.health.pojo.Member;
import com.itheima.health.pojo.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.Date;
import java.util.List;
import java.util.Map;


@Mapper
public interface OrderDao {

    /**
     * 根据体检预约id查找体检预约信息
     * @param id
     * @return
     */
    Order selectById(Integer id);

    Integer[] selectSetmealId();

    Integer selectCount(Integer setmealId);

    /**
     * 查询在该时间区间内的体检预约订单的数量
     * @param startTime
     * @param endTime
     * @param orderStatus
     * @return
     */
    Integer selectOrderByOrderTime(@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("orderStatus") String orderStatus);

    /**
     *
     * @return
     */
    List<Map<String,Object>> selectHotSetmeal();

    Integer insertOrder(Order order);

    Order selectOrderByMemberIdOrderDateSetmealId(@Param("memberId") Integer memberId, @Param("date") String date, @Param("setmealId") Integer setmealId);



}
